
<?php 
    $showIime= function($useUserVal,$userId){
        if($useUserVal->Id == $userId){
            return ;
        }
        $html = "<li>".mb_substr($useUserVal->nikename,0,1,"utf-8")."***".mb_substr($useUserVal->nikename,-1,1,"utf-8")."&nbsp;&nbsp;";
        $time1=strtotime($useUserVal->LastLogin);
        $time2=strtotime("now");
        $sec=$time2-$time1;
        $year=floor($sec/3600/24/365);//年
        $temp=$sec-$year*365*24*3600; 
        $month=floor($temp/3600/24/30);//月 
        $temp=$temp-$month*30*24*3600;
        $day=floor($temp/3600/24);//日 　
//        $html .= $day>0?$day."天":"";
        $temp=$temp-$day*3600*24;
        $hour=floor($temp/3600);//小时 　　
        if(date("H") < 10){
            $hour = 23 - date("H");
        }
        $html .= $hour>0?($hour>9?$hour:"0".$hour)."小时":"";
        $temp=$temp-$hour*3600;
        $minute=floor($temp/60);//分 　
        $html .= $minute>0?($minute>9?$minute:"0".$minute)."分":"";
        $second=$temp-$minute*60;//秒 　
        $html .= (!$day&&!$hour&&!$minute&&$second<5)?"刚刚":($second>9?$second:"0".$second)."秒前";
        $html .= "领取现金劵50元</li>";
        echo $html;
    }
?>
<ul>
    <?php if($this->useUser){ foreach ($this->useUser as $key => $useUserVal) { 
        if($useUserVal->Id == $this->userId){
            return ;
        }
        ?>
        <li class="useUser" <?php echo "style='".($key<20?"display:none;":"display:block;")."'"?> name="<?php echo $key;?>"><?php echo mb_substr($useUserVal->nikename,0,1,"utf-8")."***".mb_substr($useUserVal->nikename,-1,1,"utf-8"); ?>&nbsp;&nbsp;领取现金劵50元</li>
    <?php }} else { ?>
        <li>活动还为开启，请等待!</li>
    <?php } ?>
</ul>